package com.example.goodsserver.utils;

import java.util.HashMap;

public class LeafUtil {
    public static Long getLeafId(String biz) {
        String id = HttpClientUtil.get("http://localhost:8090/api/snowflake/get/" + biz, new HashMap<>(), new HashMap<>(), false);
        if (id == null) {
            throw new RuntimeException("获取分布式id失败");
        }
        return Long.valueOf(id);
    }
}